package org.easymodelers.gmf.creator.template.element;

import java.util.Map;

import org.easymodelers.gmf.creator.template.AbstractMapTemplateBasedElementDefinitionHandler;
import org.easymodelers.modeler.data.ElementDefinition;

public class ElementTemplateBasedMapHandler extends AbstractMapTemplateBasedElementDefinitionHandler {

	protected String getTemplatePath() {
		return "/org/easymodelers/gmf/creator/template/element/element-map.xml";
	}

	protected void initializeContextForElementDefinition(ElementDefinition definition, Map<String, Object> context) {
		ElementTypeData data = new ElementTypeData();
		data.setFigureDescriptorName(definition.getAttributes().get("name")+"FigureDescriptor");
		data.setFigureName(definition.getAttributes().get("name")+"Figure");
		data.setNodeName(definition.getAttributes().get("name")+"Node");

		context.put("data", data);
	}

}
